
package com.shangsi.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * https://www.cnblogs.com/ldmy/p/14302332.html
 * 整合nacos，持久化限流规则
 * 限流模式：关联 ：例如 支付接口除了问题，则下单接口就要限流
 * 别人感冒我吃药
 * @author dzd
 * @date 2021-12-15
 */
@RestController
public class SentinelFlowModeController {

    /**
     * 测试关联
     * @return Str
     */
    @RequestMapping("testA")
    public String testA() {
        return "sentinel 大家好 testA！" + System.currentTimeMillis();
    }

    /**
     *
     */
    @RequestMapping("testB")
    public String testB() throws InterruptedException {
        return "sentinel 大家好 testB！" + System.currentTimeMillis();
    }




}
